package com.nopay.cdxphone.bean.response;

import android.annotation.SuppressLint;

import java.io.Serializable;
import java.util.List;

/**
 * @ProjectName: myVisualPhone
 * @Package: cn.cn.myvisualphone.bean.response
 * @ClassName: UpdateUserInfoResponse
 * @Description: java类作用描述
 * @Author: anqi
 * @CreateDate: 2021/5/27 6:31
 * @UpdateUser: 更新者
 * @UpdateDate: 2021/5/27 6:31
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class VIPResponse implements Serializable {

    private String code;
    private String msg;
    private List<Data> data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<Data> getData() {
        return data;
    }

    public void setData(List<Data> data) {
        this.data = data;
    }

    public static class Data {

        private long id;
        private int monthNum;
        private float price;
        private String memberLevel;
        private int enableStatus;
        private String createTime;
        private int type;
        private boolean isSelected;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public int getMonthNum() {
            return monthNum;
        }

        public void setMonthNum(int monthNum) {
            this.monthNum = monthNum;
        }

        public float getPrice() {
            return price;
        }

        @SuppressLint("DefaultLocale")
        public String getPriceByFormat2() {
            return String.format("%.2f", price);
        }

        public void setPrice(float price) {
            this.price = price;
        }

        public String getMemberLevel() {
            return memberLevel;
        }

        public void setMemberLevel(String memberLevel) {
            this.memberLevel = memberLevel;
        }

        public int getEnableStatus() {
            return enableStatus;
        }

        public void setEnableStatus(int enableStatus) {
            this.enableStatus = enableStatus;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getDays() {
            return monthNum * (type == 1 ? 30 : 1);
        }

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }
    }
}
